home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Experimental BBS Explossion 3
/
Experimental BBS Explossion III.iso
/
gus
/
sdkdigv8.zip
/
SDKV8N19.TXT
< prev
next >
Wrap
Text File
|
1994-01-21
|
9KB
|
211 lines
Apparently-To: john.smith@gravis.com
GUS Programmer's Digest Fri, 21 Jan 94 4:05 Volume 8: Issue 19
Today's Topics:
_HELP_
GUS Programmer's Digest V8 #17
Patches and envelopes
UltraStartVoice -mode
Standard Info:
- Meta-info about the GUS can be found at the end of the Digest.
- Before you ask a question, please READ THE FAQ.
----------------------------------------------------------------------
Date: Fri, 21 Jan 1994 10:18:13 +1030 (CST)
From: Gavin <SCARMAN@hfrd.dsto.gov.au>
Subject: _HELP_
OK, I give up. I can't even get the bloody example that came with sdk2.01 to
play a real voice. This is what I did...
Using Patch.exe:
1/ load woodflut.pat
2/ noted the loop points. these appear to be half the value of what's in the
patch header because it's a 16 bit patch (?).
3/ saved the raw info as woodflut.raw
4/ ran playfile loaded woodflut.raw /set volume to 256
5/ played the file as 16bit/unsigned/mono/22050 and it sounds like a woodflut.
6/ ran example.exe and loaded woodflut.raw/unsigned/16bit/3856bytes
7/ note on: start0/loopstart3740/loopend3826/16bit/uni-looping
8/ result = garbage. sounds very much like random bytes.
9/ beats me what I'm doing wrong.
PLEASE will someone give me an example of loading and playing a patch using the
SDK.
------------------------------
Date: Thu, 20 Jan 94 21:46:50 MST
From: "Shawn T. Rutledge" <rutledge@enuxhb.eas.asu.edu>
Subject: Re: GUS Programmer's Digest V8 #17
> From: bpage@infi.net (Bob Page)
> Subject: Re: programming Voice recognition for GUS
>
> If anyone is interested, I have posted on EPAS the Creative Labs Voice
> Assist demo that came with my Borland C++ 4.0 CD upgrade. It includes
> source (C & C++) examples, API info and other "goodies".
>
> --
> --- Bob Page (bpage@infi.net)
Are you implying that this can be used with the GUS? I got a friend's
soundblaster version, and it wouldn't work with the GUS.
------------------------------
Date: Thu, 20 Jan 1994 22:42:24 -0500 (EST)
From: Phat H Tran <ptran@sciborg.uwaterloo.ca>
Subject: Patches and envelopes
Jason,
Mail to you bounced, so I'm forwarding my letter to you to the
SDK digest since you seem to be receiving it okay.
----- Recipients of this delivery -----
Jason William Whiteman <jww9624@tamsun.tamu.edu> (bounced)
[ ^^^ That was the address and userid I sent to.]
On Thu, 20 Jan 1994, Jason William Whiteman wrote:
>
> Phat,
>
> I appreciate your concern for clarifying the patch format. I would
> have liked to see Forte acknowledge the need for fractional start/stop points
> (voice) in the SDK; but you can't have everything [for free].
> Now, a little clarification is needed:
>
> Forwarded message:
> > Since the GUS' volume is log instead of linear, with a zero volume setting
> > of zero and not negative infinity, I'm not sure how we'd go about attenuating
> > the envelope offsets. Do we substract some x from the offsets based on the
> > channel volume? I think this would be the way it's done for a true log scale
> > (i.e. one that goes to negative infinity for zero volume). For the GUS,
> > it's probably best to treat everything linearly, and just use the following
> > formula:
> >
> > linoffset = chan_vol/127 * expression/127 * absoffset
> > logoffset = log(linoffset + 1)/log(128) * K
> >
>
> Ok, a few variables were introduced here:
>
> linoffset : intermediate value for the linear offset value
> chan_vol : the current voice's volume
The channel volume is controlled by MIDI controller 7, and can be from
0 to 127.
> expression : I don't know what exactly the expression is to represent. I
> suppose it is some sort of MIDI data. What is the default
> expression value? That is, if I were to keep expression
> constant, what should it be kept at (127?)
The expression is set by controller 11. It's another "knob" you can
"twiddle" to adjust the volume. I think it's usually used to modulate
the volume of a voice as it's playing (eg. during a crescendo), whereas
the channel volume is usually set once at the start and left alone.
If you're not aware, MIDI messages can be sent on one of 16 channels.
Expression and channel volume can be set independently for each
channel. If, for example, the expression for channel 1 is set to 110,
and its volume set to 120, an envelope offset would be scaled as
follows:
linoffset = 110/127 * 120/127 * absoffset
Well, I shouldn't sound so authorative, since that's only how I _think_
the envelopes are scaled after fooling around with Forte's drivers.
> absoffset : the envelope offset value Envelope_Offset[x]
> K : 1000 (?)
K would be 4096, the GUS' maximum hardware volume setting.
------------------------------
Date: Thu, 20 Jan 94 10:20:59 EST
From: support@fortech.com (Technical Support)
Subject: Re: UltraStartVoice -mode
> This mode byte has me stumped. I've loaded the raw data into the GUS from a
> patch (woodflut) after having read the headers.
> If you read the example.c from sdk2.01:
> it ORs the mode (control) byte with 0x08 ie. bit3 for uni-directional looping
> but in the patch.h it says bit3 is bi-directional looping???
> But me problem is if I UltraStartVoice with the control/mode byte set to 0x08 I
> get a sound (which may possibly be a woodflute), if I use the mode byte read
> from the patch 0x67 then I get no sound at all. To me 0x67 seems to make more
> sense than 0x08 but it doesn't work! To get the mode byte I'm just fread'ing the
> structures in patch.h.
The difference in the mode bytes is that the one used in UltraStartVoice
is actually what gets written to the hardware register for the voice. The
mode in the patch is interpretted by software and not written directly
to the hardware. The program will look at the mode in the patch and set
the appropriate bits in the mode that gets written to the hardware. Some
of the bits in the mode in the patch are of no interest to the hardware.
Hope this helps.
Forte Tech Support
------------------------------
From: (null)
> I think you gave an answer in terms of implementing a MIDI engine.
> Although a MIDI engine would be a nice place to go with implementing the
> patches, at this point I'm just working on starting at a volume and
> playing the envelope correctly. I am not very familiar with expression
> (what it means, or the upper limit of the expression value). Nor do I
> know the upper limit of a chan_vol. I'd like to keep everything at the
> GUS hardware level before adapting to the MIDI standard. That is, an
> upper limit for a volume = 4095 (logarithmic). I was under the impression
> that the patch format should map directly to the GUS (and not MIDI). That
> is, volumes/envelopes/etc should all have the GUS's logarithmic nature
> in mind.
It's hard to get intuitive results using the GUS' native logarithmic
volumes. I find it more convenient to think of volumes linearly,
with 2 twice as loud as 1, and 64 twice as loud as 32, etc. That makes
the process of shaping the overall volume rather obvious: just
multiply the volume factors together. Once you have the final scaled
linear volume, it's a simple step to convert it to the GUS' log volume.
I'd like to know what your thoughts are on all this.
Phat.
------------------------------
End of GUS Programmer's Digest V8 #19
*************************************
To post to tomorrow's digest: <gus-sdk@dsd.es.com>
To (un)subscribe or get help: <gus-sdk-request@dsd.es.com>
To contact a human (last resort): <gus-sdk-owner@dsd.es.com>
FTP sites: archive.epas.utoronto.ca /pub/pc/ultrasound
wuarchive.wustl.edu /systems/ibmpc/ultrasound
archive.orst.edu /pub/packages/gravis
theoris.rz.uni-konstanz.de /pub/sound/gus
nctuccca.edu.tw /PC/ultrasound
FTP mail server: mail-server@nike.rz.uni-konstanz.de
Hints:
- Get the FAQ from the FTP sites or the request server.
- Mail to <gus-sdk-request@dsd.es.com> for info about other GUS
related mailing lists (general use, musician's, etc.).